#include <stdio.h>


int partiton(int x[],int low,int high)
{
    int pivot=x[low];
    while(low<high)
    {
        while(low<high&&x[high]>=pivot)
        {
            high--;
        }
        x[low]=x[high];
        while(low<high&&x[low]<=pivot)
        {
            low++;
        }
        x[high]=x[low];
    }
    x[low]=pivot;
    return low;
}

void sort(int x[],int low,int high)
{
    if(low<high)
    {
        int pivot= partiton(x,low,high);
        sort(x,low,pivot-1);
        sort(x,pivot+1,high);
    }
}


int main(void) {
    int n;
    int x[10000];
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&x[i]);
    }
    sort(x,0,n-1);
    for(int i=0;i<n;i++)
    {
        printf("%d ",x[i]);
    }
    return 0;
}



